

package org.argeproje.resim.ui.rcp;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

public class Perspective implements IPerspectiveFactory {

	/**
	 * Creates a simply layout to demonstrate RCP usage
	 */
	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		IFolderLayout fl = layout.createFolder("BottomFolder", IPageLayout.BOTTOM, 0.77f, editorArea);
		fl.addView(IPageLayout.ID_PROP_SHEET);		
		/*
		MessageConsole console = new MessageConsole("System Output", null);
		ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { console });
		fl.addView(IConsoleConstants.ID_CONSOLE_VIEW);
		MessageConsoleStream stream = console.newMessageStream();
		System.setOut(new PrintStream(stream));
		System.setErr(new PrintStream(stream));
		*/
		Console console = new Console("Groovy Steps..");
		//ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { console });
		//fl.addView(IConsoleConstants.ID_CONSOLE_VIEW);

		
		//layout.addView(IPageLayout.ID_PROP_SHEET, IPageLayout.BOTTOM, 0.77f,editorArea);
		//layout.addView(IConsoleConstants.ID_CONSOLE_VIEW, IPageLayout.BOTTOM, 0.4f, IPageLayout.ID_PROP_SHEET);
		layout.getViewLayout(IPageLayout.ID_PROP_SHEET).setCloseable(false);
		layout.setFixed(false);
	}

}
